package my.design.visitor;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author zp
 * @version 1.0
 * @description: 家长观察者
 * @date 2022/10/22 16:06
 */
public class Parent implements Visitor {

    private final Logger logger = LoggerFactory.getLogger(Parent.class);

    @Override
    public void visit(Student student) {
        logger.info("学⽣信息 姓名：{} 班级：{} 排名：{}", student.name, student.clazz, student.ranking());
    }

    @Override
    public void visit(Teacher teacher) {
        logger.info("⽼师信息 姓名：{} 班级：{} 级别：{}", teacher.name, teacher.clazz, teacher.identity);
    }
}


